package com.briup.interfance;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/5-10-05-9:29
 * @Description：com.briup.interfance   jdk8 新特性
 */
public class actionImpl implements action{

    @Override
    public void say() {
        System.out.println("say ,,,,");
    }

    public static void main(String[] args) {
        action object = new actionImpl();
        action.staticMethod();                               //静态方法需要类名.方法名
        object.defaultMethod();
        object.say();
    }
}
interface action{
    public void say();
    default void defaultMethod(){                         //默认方法
        System.out.println("action.defaultMethod");
    }
    public static void staticMethod(){                      //静态方法
        System.out.println("action.staticMethod");
    }
}

